// SETUP

#include intrographics.txt
#include ladyluckbiggraphics.txt

setdatapath("data/graphics/cutscenes/warrior/");

var warriorgraphics = {
	idle: {
		animation: "warrior_idle.json",
		pack: "warrior.pck",
		loop: true
	},
	worried_idle: {
		animation: "warrior_worried_idle.json",
		pack: "warrior.pck",
		loop: true
	}
}
var warrior = addsprite("warrior", 1, warriorgraphics);

// HELPER FUNCTIONS	

var fade_time = 0.4;

// ACTORS
actor("Lady Luck", screenwidthmid + 800, 550, Col.YELLOW, CENTER, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
actor("Warrior", 2670, 670, Col.LIGHTBLUE, CENTER, BOTTOM, "chat_warrior", "characters/warrior/charicon_warrior");

// INTRO

play("music_cutscene_lesscheery");

warrior.scale = 0.5;
warrior.x = 2670 - ((warrior.getwidth("idle") * warrior.scale) / 2);
warrior.y = 700;
changebackground("intro_stage");
fadein();
warrior.show("idle");

ladyluck_big.x = -screenwidth;
ladyluck_big.show("idle");
Actuate.tween(ladyluck_big, 2, { x: 0 }).ease(Expo.easeOut);

wait(0.5);

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "It’s time for another episode of Dicey Dungeons,|with our feisty little fighter, the Warrior!");
ladyluck_big.show("idle", true);

speak("Warrior", "Hey, Lady Luck! I’m doing great, aren’t I?");

ladyluck_big.show("talking", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "You sure are!");
ladyluck_big.show("idle", true);

speak("Warrior", "If I keep this up I’ll have that|monster truck in no time!");

ladyluck_big.show("talking-sly", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 280, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", 'So determined! And I think you may be right: you|WILL have that monster truck in... “no time”.', "sly");
ladyluck_big.show("idle-sly", true);

speak("Warrior", "Yeah! Wait, what?", "thinking");

ladyluck_big.show("talking-thinking", true);
speak("Lady Luck", '...it’s a double meaning, you see.|“No time” could also mean “never”.', "thinking");
ladyluck_big.show("talking-confused", true);
actor("Lady Luck", screenwidthmid + 240, screenheightmid - 240, Col.YELLOW, RIGHT, BOTTOM, "chat_ladyluck", "characters/misc/charicon_ladyluck");
speak("Lady Luck", "Please don’t tell me I need to make this any clearer.", "confused");
ladyluck_big.show("idle-confused", true);

speak("Warrior", "Wait, but I’m doing great! You just said!", "worried");

ladyluck_big.show("talking", true);
speak("Lady Luck", "OF COURSE I did, and of course none of us have any reason|to believe that my show isn’t completely fair.");
speak("Lady Luck", "So in you go for another round!");
ladyluck_big.show("idle", true);

startgamefromcutscene();